<template>
  <div>
    <router-view>
      
    </router-view>
  </div>
</template>
<style scoped>
* {
  margin: 0;
  padding: 0;
}
li {
  list-style: none;
  font-size: 0.3rem;
}
li img {
  width: 1rem;
  height: 1rem;
}
p {
  width: 40rem;
}
.te {
  width: 9rem;
  height: 2rem;
}
.xin {
  width: 100%;
  overflow: hidden;
}
span {
  position: absolute;
}
.swiper-container {
  width: 100%;
  height: 100%;
}

.swiper-slide {
  text-align: center;
  font-size: 18px;
  background: #fff;
  height: 200px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  -webkit-align-items: center;
  align-items: center;
}
</style>
<script>
import axios from "axios";
export default {
  data() {
    return {
      arr: [],
      bool: false,
      n: "",
      arrNew: [],
      srcc: `https://jd.itying.com/`,
      arr1: [],
      m: 0,
    };
  },
  methods: {
    cha(index) {
      this.bool = true;
      this.n = this.arr[index]._id;
      this.axios("https://jd.itying.com/api/plist?cid=" + this.n).then(
        (res) => {
          this.arrNew = res.data.result;
          console.log(this.arrNew);
        }
      );
    },
    huan(index) {},
  },
  computed: {
    swiper() {
      return this.$refs.mySwiper.swiper;
    },
  },
  mounted() {
    // this.swiper.slideTo(3, 1000, false);
    this.axios("https://jd.itying.com/api/pcate").then((res) => {
      this.arr = res.data.result;
      console.log(res);
      console.log(this.arr);
    });
    this.axios("https://jd.itying.com/api/focus").then((res) => {
      this.arr1 = res.data.result;
      console.log(res);
      console.log(this.arr1);
    });
  },
};
</script>
